import { _decorator, Collider, Component, Enum, Node, RigidBody } from 'cc';
const { ccclass, property } = _decorator;

enum PhyGroup{
    Default = 1 << 0,
    Ball = 1 << 1,
    Monse = 1 << 2,
    Wall = 1 << 3,
}

Enum(PhyGroup);

@ccclass('PhysicalGroup')
export class PhysicalGroup extends Component {
    
    @property({type:PhyGroup})
    public group = PhyGroup.Default;

    @property({type:PhyGroup})
    public mask = PhyGroup.Default;

    protected onLoad(): void {
      
    }

    start() {
       
        this.node.getComponent(Collider).setGroup(this.group);
        this.node.getComponent(Collider).setMask(this.mask);
    }

    update(deltaTime: number) {
        
    }
}

